package com.boatAnchorAssistant.service.repository.impl;

import com.boatAnchorAssistant.pojo.entity.DepartmentLinkmanMp;
import com.boatAnchorAssistant.service.mapper.DepartmentLinkmanMpMapper;
import com.boatAnchorAssistant.service.repository.in.DepartmentLinkmanMpRepository;
import nirvana.core.repository.Repository;
import org.springframework.stereotype.Service;

/**
 * 【描 述】：
 * 【环 境】：J2SE
 * 【详 细】：
 */
@Service
public class DepartmentLinkmanMpRepositoryImpl extends Repository<DepartmentLinkmanMpMapper, DepartmentLinkmanMp> implements DepartmentLinkmanMpRepository {

    private final DepartmentLinkmanMpMapper mapper;

    public DepartmentLinkmanMpRepositoryImpl(DepartmentLinkmanMpMapper mapper) {
        this.mapper = mapper;
    }


    /**
     * 清理
     *
     * @param id
     */
    @Override
    public void clean(Long id) {
        if (id==null){
            return;
        }
        DepartmentLinkmanMp t = new DepartmentLinkmanMp();
        t.setDepartmentId(id);
        mapper.delete(getWrapper(t));
    }
}